﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">

    <SolidColorBrush x:Name="BackgroundBrush"
                     Color="#FF6A00" />

    <Style x:Key="CallHyperlink"
           TargetType="HyperlinkButton">
        <Setter Property="Foreground"
                Value="{StaticResource PhoneForegroundBrush}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="FontSize"
                Value="{StaticResource PhoneFontSizeMedium}" />
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="Margin"
                Value="{StaticResource PhoneVerticalMargin}" />
        <Setter Property="toolkit:TiltEffect.IsTiltEnabled"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Border Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="0.5"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="TextElement" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                       Storyboard.TargetName="TextElement">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{StaticResource PhoneDisabledBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{TemplateBinding Background}"
                                Margin="{StaticResource PhoneHorizontalMargin}"
                                Padding="{TemplateBinding Padding}">
                            <ContentControl x:Name="TextElement" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>